package demo12;

import demo2.Student;
import org.apache.commons.beanutils.BeanUtils;

public class TestCopyProperties {
    public static void main(String[] args) throws Exception{
        Student student = new Student();
        student.setName("小三");
        student.setAge(22);

        Student student2 = new Student();

        // 将student对象的属性值赋值给student2
        BeanUtils.copyProperties(student2,student);

        System.out.println(student2);
    }
}
